package com.lagou.xm.io;

import java.io.InputStream;

/**
 * @author XM,Email is huangwei@mrfresh.com
 * @ClassName Resource
 * @Package com.lagou.xm.io
 * @Description 配置文件资源加载器
 * @since 2020/9/24 21:02
 * @Copyright: 训练营
 */
public class Resources {

    /**
     * @Description 资源文件加载静态方法
     * @param path
     * @author XM,Email is huangwei_xm@163.com
     * @since 2020/9/24 21:03
     */
    public static InputStream getResourceAsStream(String path) {
        InputStream resourceAsStream = null;
        try {
            resourceAsStream = Resources.class.getClassLoader().getResourceAsStream(path);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return resourceAsStream;
    }
}
